class CreateMemberships < ActiveRecord::Migration
  def self.up
    create_table :memberships do |t|
  		t.integer :group_id, :user_id, :role_id, :null => false
  		t.userstamps
  		t.timestamps
    end
    
    add_index "memberships", ["group_id", "user_id"], :name => "index_memberships_on_group_id_and_user_id", :unique => true
    
  end

  def self.down
    drop_table :memberships
  end
end
